-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support of upsert for Postgres and MySQL #987
Conversation
613f05a
to
956c27e
Compare
a2e4f6d
to
aee5a50
Compare
aa559a1
to
f1926ee
Compare
Any update on this? |
@Nickersoft Hello, I'm working on it when I have time. I have plans to ship it with next 2.4.0 release |
@mentegy Cool! Thanks for the update :) |
ce117c3
to
c0682ae
Compare
29f41c2
to
3853c18
Compare
@getquill/maintainers It's ready for review. Please refer information in readme for more details |
@@ -92,6 +92,8 @@ case class If(condition: Ast, `then`: Ast, `else`: Ast) extends Ast | |||
|
|||
case class Assignment(alias: Ident, property: Ast, value: Ast) extends Ast | |||
|
|||
case class Excluded(alias: Ident) extends Ast |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you give a more descriptive name to these new AST classes? Or maybe nest them within an object that has a name that clarifies their purpose.
@@ -129,6 +131,16 @@ case class Returning(action: Ast, alias: Ident, property: Ast) extends Action | |||
|
|||
case class Foreach(query: Ast, alias: Ident, body: Ast) extends Action | |||
|
|||
case class Conflict(insert: Ast, target: Conflict.Target, action: Conflict.Action) extends Action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think OnConflict
would be a better name
besides the naming, everything else LGTM |
@mentegy the compilation is failing:
|
Does any of this borrow from the pull req I made a lifetime ago? If it's a continuation of that can I close the other since @mentegy has seemed to pick this up? |
@getquill/maintainers It's all green now! |
@fwbrasil Build is passing and PR is updated regarding your notes. This PR blocks our next release |
@mentegy I think you missed my comments about naming |
@fwbrasil oops, I must have pushed wrong version when syncing with upstream. Now your notes are applied |
This is exciting! Users have been asking for this feature for so long |
@mentegy Awesome ) |
Fixes #16
Fixes #595
Taking into account experience from #595 I've came up with an another implementation of upsert feature for postgres and mysql
Checklist
README.md
if applicable[WIP]
to the pull request title if it's work in progresssbt scalariformFormat test:scalariformFormat
to make sure that the source files are formatted@getquill/maintainers